package com.sc.nft.feign;

import com.sc.nft.dto.Card4ValidateDTO;
import com.sc.nft.dto.IdRequest;
import com.sc.nft.dto.RealNameVerificationDTO;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;


/**
 * 数据宝feign聚合
 */
@FeignClient(name = "meta-open-cloud",path = "/shuJuBao/rpc")
public interface ShuJuBaoCloudFeign {

    @ApiOperation(value = "获取人脸核验h5", notes = "获取人脸核验h5", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/liveDetection", produces = MediaType.APPLICATION_JSON_VALUE)
    String liveDetection(@Valid @RequestBody IdRequest idRequest);

    @ApiOperation(value = "人脸检测回调地址", notes = "人脸检测回调地址", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/liveDetection/callBack", produces = MediaType.APPLICATION_JSON_VALUE)
    ShuJuBaoFaceCheckVO liveDetectionCallBack(@RequestBody ShuJuBaoLiveDetectionVO shuJuBaoLiveDetectionVO);


    @ApiOperation(value = "token失效", notes = "token失效", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/tokenExpire/{imag}", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<Boolean> tokenExpire(@PathVariable("imag")String im);

    @ApiOperation(value = "手机三要素验证", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/mobilePhoneThreeVerification", produces = MediaType.APPLICATION_JSON_VALUE)
    MobilePhoneThreeVerificationVO mobilePhoneThreeVerification(@RequestBody RealNameVerificationDTO RealNameVerificationDTO);

    @ApiOperation(value = "实名认证验证", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/realNameVerification", produces = MediaType.APPLICATION_JSON_VALUE)
    RealNameVerificationVO realNameVerification(@RequestBody RealNameVerificationDTO RealNameVerificationDTO);

    @ApiOperation(value = "银行卡四要素验证", httpMethod = "POST")
    @PostMapping(value = "/card4Validate", produces = MediaType.APPLICATION_JSON_VALUE)
    Card4ValidateVO card4Validate(@RequestBody Card4ValidateDTO card4ValidateDTO);
}
